/ Assembly List / LJCNetCommon / NetCommon / GetInt16

Namespace - LJCNetCommon


Parameters
value - The value object.

Returns

The long value or zero if the object is null. Also returns zero if the object is not type "short".

Syntax

C#
public static Int16 GetInt16(Object value)

Gets a short value from an object. (E)

Example

C#
using LJCNetCommon;

// Gets a short value from an object.
private static void GetInt16()
{
  // Simulates an Object value like that received from a DataTable.
  short setup = 3;
  object obj = setup;

  // Gets a short value from an object.
  short value = NetCommon.GetInt16(obj);
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.